home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 3 / Info_Mac_1994-01.iso / Development / Source / MultiSession 1.04 Source / Core 27⁄June⁄1993 / CWindow.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-05-09  |  4.4 KB  |  116 lines  |  [TEXT/KAHL]

  1. /* CWindow.h */
  2.  
  3. #pragma once
  4.  
  5. #include "CEnclosure.h"
  6.  
  7. class CSack;
  8.  
  9. #define JustifyLeft (teJustLeft)
  10. #define JustifyCenter (teJustCenter)
  11. #define JustifyRight (teJustRight)
  12.  
  13. #define ModelessWindow (False)
  14. #define ModalWindow (True)
  15. #define YesGrowable (True)
  16. #define NoGrowable (False)
  17. #define YesZoomable (True)
  18. #define NoZoomable (False)
  19.  
  20. #define GrowIconPictID (139)
  21. #define EmptyGrowIconPictID (140)
  22.  
  23. struct    CWindow    :    CEnclosure
  24.     {
  25.         GrafPtr                MyGrafPtr;
  26.         LongPoint            DrawingOrigin;
  27.         MyBoolean            Modality;
  28.         MyBoolean            Growable;
  29.         MyBoolean            Zoomable;
  30.         LongPoint            ClipStart;
  31.         LongPoint            ClipExtent;
  32.         CViewRect*        OurKeyReceiver;
  33.         CSack*                ListOfWindowClients;
  34.         short                    ZoomStatePartCode;
  35.         EXECUTE(MyBoolean Initialized;)
  36.  
  37.         /* */            ~CWindow();
  38.         /* */            CWindow();
  39.         void            IWindow(LongPoint Start, LongPoint Extent, MyBoolean Modality,
  40.                                 MyBoolean GrowFlag, MyBoolean ZoomFlag);
  41.         void            MakeMyGrafPtr(LongPoint Start, LongPoint Extent);
  42.         void            DeleteMyGrafPtr(void);
  43.         void            DoUpdate(void);
  44.         void            DoSuspend(void);
  45.         void            DoResume(void);
  46.         Rect            GetConstraint(void);
  47.         LongPoint    SnapToGrid(LongPoint NewWindowSize);
  48.         void            DoGoAway(Point GlobalStart);
  49.         void            GoAway(void);
  50.         void            DoZoomIn(Point GlobalStart);
  51.         void            DoZoomOut(Point GlobalStart);
  52.         void            ZoomIn(void);
  53.         void            ZoomOut(void);
  54.         void            DoMouseDown(MyEventRec Event);
  55.         void            DoGrow(Point GlobalStart);
  56.         void            SetNewSize(LongPoint NewWindowSize);
  57.         void            DoDrag(Point GlobalStart);
  58.         void            DoFindPosition(void);
  59.         void            BecomeActiveWindow(void);
  60.         void            SetDefaultKeyReceiver(CViewRect* TheReceiver);
  61.         void            RegisterClient(CViewRect* Client);
  62.         void            DeregisterClient(CViewRect* Client);
  63.  
  64.         /* video stuff */
  65.         void            SetMyPort(void);
  66.         void            InvalidateLong(LongPoint Start, LongPoint Extent);
  67.         void            ScrollLong(LongPoint Start, LongPoint Extent, LongPoint Change);
  68.         void            ScrollLongAndInvalidate(LongPoint Start, LongPoint Extent, LongPoint Change);
  69.         void            SetOrigin(LongPoint TheOrigin);
  70.         void            SetClipRect(LongPoint Start, LongPoint Extent);
  71.         void            ResetPen(void);
  72.         void            SetPen(short Width, short Height, short Mode, Pattern ThePattern);
  73.         void            SetPenMode(short Mode);
  74.         void            SetPattern(Pattern ThePattern);
  75.         void            SetPenSize(short Width, short Height);
  76.         void            SetGreyishTextOr(void);
  77.         void            DrawLine(LongPoint Start, LongPoint Extent);
  78.         void            SetText(short FontID, Style Face, short Mode, short PointSize, Fixed Space);
  79.         void            SetTextMode(short Mode);
  80.         void            LTextBox(LongPoint Start, LongPoint Extent, Handle Text, short Justification);
  81.         void            LDrawText(LongPoint Start, LongPoint Extent, Handle Text, short Justification);
  82.         void            LDrawTextPtr(LongPoint Start, LongPoint Extent, char* Text, long Length, short Justification);
  83.         long            LMeasureText(char* Text, long NumChars);
  84.         MyBoolean    RectVisible(LongPoint Start, LongPoint Extent);
  85.         MyBoolean    LongRectToShort(LongPoint Start, LongPoint Extent, Rect* ShortOne);
  86.         void            LFrameRect(LongPoint Start, LongPoint Extent);
  87.         void            LPaintRect(LongPoint Start, LongPoint Extent);
  88.         void            LEraseRect(LongPoint Start, LongPoint Extent);
  89.         void            LFrameOval(LongPoint Start, LongPoint Extent);
  90.         void            LPaintOval(LongPoint Start, LongPoint Extent);
  91.         void            LEraseOval(LongPoint Start, LongPoint Extent);
  92.         void            LFrameRoundRect(LongPoint Start, LongPoint Extent, short OvalWidth, short OvalHeight);
  93.         void            LPaintRoundRect(LongPoint Start, LongPoint Extent, short OvalWidth, short OvalHeight);
  94.         void            LEraseRoundRect(LongPoint Start, LongPoint Extent, short OvalWidth, short OvalHeight);
  95.         void            LDrawPicture(PicHandle ThePicture, LongPoint Start, LongPoint Extent);
  96.     };
  97.  
  98. #ifndef COMPILING_CWINDOW_C
  99.     extern CWindow*    ActiveWindow;
  100.     extern LongPoint ZeroPoint;
  101. #endif
  102.  
  103. Rect            RectOf(short x1, short y1, short x2, short y2);
  104. Point            PointOf(short x, short y);
  105. LongPoint    LongPointOf(long x, long y);
  106. void            GetRect(ulong RectID, LongPoint* Start, LongPoint* Extent);
  107. MyBoolean    LongPtInRect(LongPoint ThePoint, LongPoint Start, LongPoint Extent);
  108. LongPoint    CenterRect(LongPoint Extent, LongPoint ContainerExtent);
  109. LongPoint    AlertCenterRect(LongPoint Extent, LongPoint ContainerExtent);
  110. void            SectLongRect(LongPoint Start1, LongPoint Extent1, LongPoint Start2,
  111.                         LongPoint Extent2, register LongPoint* S, register LongPoint* E);
  112. LongPoint    GetLongMouseLoc(void);
  113. short            GetFontID(PString FontName);
  114. LongPoint    MainScreenSize(void);
  115. PicHandle    GetPic(short PicID);
  116.